<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.ajax4jsf.org/rich"
      xmlns:a4j="http://richfaces.org/a4j">
<body>                      
<ui:composition template="layout/template.xhtml">
                
<ui:param name="title" value="Emails"/>     
<ui:define name="body">

<h:form>
    <rich:dataTable value="#{emails}" var="email" width="100%">
    
    	<rich:column>
    		<f:facet name="header">From</f:facet>
	        <h:outputText value="#{email.getHeaderValue('From')}"/>
    	</rich:column>
    	
    	<rich:column>
    		<f:facet name="header">To</f:facet>
	        <h:outputText value="#{email.getHeaderValue('To')}"/>
    	</rich:column>
    	
    	<rich:column>
    		<f:facet name="header">Subject</f:facet>
	        <h:outputText value="#{email.getHeaderValue('Subject')}"/>
    	</rich:column>
    	
    	<rich:column>
    		<f:facet name="header">Body</f:facet>
	        <h:outputText value="#{email.body}"/>
    	</rich:column>    	
    
    </rich:dataTable>
    
</h:form>
 </ui:define> 
</ui:composition>

</body>

</html>
